How to create letter grade function using VBA:
This function is to calculate a letter grade from the percent of the earned scores to the total possible scores. For instance, student A receives total score 85 out of 100. It would be 85% (85 /100 = 0.85 or 85%). We can set a score range and letter grade as shown in the table below as:
Score Range | Display grade Letter |
0 – 59% or 0.0- 0.59 | F |
60%- 69% or 0.6- 0.69 | D |
70% – 79% or 0.7- 0.79 | C |
80%- 89% or 0.8-0.89 | B |
90% or 0.9 up | A |
VBA code:
How to Enter VBA code:
- On your Excel workbook, Open MS Visual Basic for Application (VBA) by press key Alt + F11
- Click on Insert menu on top
- Select Module
- Open Module and place the function code as shown above in the Module
How to Use VBA code on the Excel sheet:
- Insert function to the cell you want to get a letter grade (L3 in this example)
- Select and put a cell that contains a percent score (76.33% on cell K3) inside a function
- Use Auto Fill to copy function to another cell down
Note: You have to save file type as Excel Macro-Enabled Wordbook(.xlsm) or Excel 97-2003 Workbook (.xls) format in order to have a function working.
Macro Setting:
Also in Excel 2010 version, you need to check on “Enable all macros” on Excel Options>Trust Center>Macro Setting to enable Macro or VBA function.
Video Link:
This erectile drug is easy cheap viagra no prescription to swallow as it is a prescription only drug and has been used by the natives of the countries that it grows in for centuries to increase virility. It’s popularity has not decreased, but it’s often expensive and cialis 10mg generico not covered by some insurance plans. Eat healthy food which buy tadalafil from india includes fruit and vegetables. If you are at present being getting treatment for one of these situations, permit your health advisor make tadalafil sample out how it treats impotence. |